import { RouteRecordRaw } from 'vue-router';

// * 导入所有router
const metaRouters = import.meta.globEager('./modules/*.ts');
export const routerArray: RouteRecordRaw[] = [];
Object.keys(metaRouters).forEach((item) => {
  Object.keys(metaRouters[item]).forEach((key: any) => {
    routerArray.push(...metaRouters[item][key]);
  });
});

const routes: RouteRecordRaw[] = [
  ...routerArray,
];

export default routes;
